<template>
  <view class="card" hover-class="card-active" :style="'height:'+height">
    <view class="title">{{title}}</view>
    <view class="card-content">
        <slot></slot>
    </view>
  </view>
</template>

<script>
export default {
  name: "Card",
  props:{
    title: {
      type: String,
      default: '今日课表'
    },
    height:{
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>
/* 按钮动画效果 */
.card-active{
  transition: 0.5s;
  transform:scale(0.8);
}

.card {
    margin: 20rpx 15rpx 0 15rpx;
    padding: 20rpx;
    height: 230rpx;
    background: #ffffff;
    border-radius: 25rpx;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.4s;
    .title {
        font-size: 28rpx;
        color: black;
        font-weight: bolder;
        flex: 0.2;
    }

  .card-content {
    flex: 0.8;
  }



}
</style>